#ifndef __MCS__VARIABLE_DECLARATION_LIST__HPP
#define __MCS__VARIABLE_DECLARATION_LIST__HPP

#include "Variable.hpp"

class VariableDeclarationList : public Object
{
public:
	VariableDeclarationList() {}

	void addVariable(ptr<Variable> var) { vars_.push_back(var); }

	void init(Value::DataType type, Block * parentBlock)
	{
		for(size_t i=0; i<vars_.size(); ++i)
		{
			vars_.at(i)->init(type, parentBlock);
		}
	}

	void create()
	{
		for(size_t i=0; i<vars_.size(); ++i)
		{
			vars_.at(i)->create();
		}
	}

	size_t count() const { return vars_.size(); }
	ptr<Variable> variable(size_t i) const { return vars_.at(i); }
private:
	std::vector< ptr<Variable> > vars_;
};

#endif //__MCS__VARIABLE_DECLARATION_LIST__HPP
